// home/index.js
Page({
  data: {
    menuList: [
      {
        id: 'index',
        title: '跳转到Index页面',
        type: 'navigate',
        url: '/pages/index/index'
      },
      {
        id: 'audio',
        title: '获取音频列表',
        type: 'navigate',
        url: '/pages/audioList/index'
      }
    ]
  },  

  onLoad() {
    // 页面加载时的初始化
  },

  onMenuTap(e) {
    const { type, url } = e.currentTarget.dataset
    
    if (type === 'navigate' && url) {
      // 跳转页面
      wx.navigateTo({
        url: url
      })
    }
  },

})
